CPP=/usr/bin/g++
RM=/bin/rm
INCLUDES=-I/usr/local/include/spatialindex
CPPFLAGS=-g -Wall  $(INCLUDES) # -mcmodel=large

LIBS=-lspatialindex

SRC=libs.cpp knn.cpp RTree_index.cpp
OBJ=$(SRC:.cpp=.o)
EXE=knn

all:$(EXE)

$(EXE):$(OBJ)
	$(CPP) $(LIBS) $^ -o $@

.o:.cpp
	$(CPP) $(CPPFLAGS) -c $< -o $@

clean:
	@$(RM) -rf $(OBJ) $(EXE)
